const pageJson = {
  title: "页面名称",
  activityTime: ["2023-05-01", "2023-07-01"],
  backgroundColor: "#fff",
  hoverBtns: ["home", "shopping-cart"],
  share: true,
  shareImage: "",
  shareTitle: "",
  shareDesc: "",
  list: [],
};
const list = [
  {
    // 唯一标识
    id: 1,
    type: "package-image",
    name: "图片组件",
    // dataJson: {},
    mainJson2: {

    },
    mainJson: [
      {
        peopleRule: 1,
        // TODO 图片content和商品content保持一致
        contentJson: {
          data: [
            {
              id: "",
              rank: 1,
              // 图片地址
              src: "",
              // 跳转类型
              jumpType: 1,
              // 跳转链接
              jumpLink: "",
              jumpId: "",
              // Tips：热区部分，本期不做
              hotAreaList: [{ type: 1, link: "", jumpId: "" }],
            },
          ],
        }
      },
    ],
    styleJson: {
      templateType: 1,
      // TODO 上下边距大小是否保持一致？
      paddingTB: 12,
      // paddingTop: 12,
      // paddingBpttom: 12,
      backgroundColor: "#fff",
    },
  },
  {
    id: 4,
    type: "package-coupon",
    name: "优惠券组件",
    mainJson: [
      {
        peopleRule: 1,
        contentJson: {
          // Tips key在C端用来获取对应的商品列表
          key: 4123,
          data: [
            {
              id: "",
              rank: 1,
              couponId: "111",
              couponType: 1,
              name: "乳制品周年庆专用",
              ...
            }
          ],
          filterItems: ["no-stock", "expired"],
          showLimit: 10,
        },
      },
    ],
    styleJson: {
      templateType: 1,
      couponBackgroundImg: ['', '', ''],
      buttonColor: ['', '', ''],
      couponTextColor: ['', '', ''],
      buttonTextColor: ['', '', ''],
      paddingTB: 12,
      backgroundColor: "#fff",
    },
  },
  {
    id: 2,
    type: "package-goods",
    name: "商品组件",
    mainJson: [
      {
        peopleRule: 1,
        // TODO 拆分json or 平铺与peopleRule平级
        contentJson: {
          // Tips key在C端用来获取对应的商品列表
          key: 123,
          data: [
            {
              id: "",
              rank: 1,
              skuId: "A001S01R001",
              name: "黄凯特芒",
              // Tips 规格、类型等B端不需保存，但需要传给C端渲染展示
            },
            {
              id: "",
              rank: 2,
              skuId: "C001S03R003",
              name: "泰国无核榴莲冻肉",
              // 规格 类型等
            },
          ],
          filterItems: ["no-stock", "remove"],
          showLimit: 10,
        },
      },
    ],
    styleJson: {
      templateType: 1,
      paddingTB: 12,
      backgroundColor: "#fff",
    },
  },
  {
    id: 3,
    type: "package-tabs",
    name: "tab组件",
    mainJson: [
      {
        peopleRule: 1,
        contentJson: {
          data: [
            {
              id: "",
              rank: 1,
              name: "烘培",
              // 不保存，与c端交互用
              focus: true,
              children: [
                {
                  id: 31,
                  type: "package-image",
                  name: "图片组件",
                  mainJson: [
                    {
                      peopleRule: 1,
                      contentData: [
                        {
                          id: "",
                          rank: 1,
                          // 图片地址
                          src: "",
                          // 跳转类型
                          jumpType: 1,
                          // 跳转链接
                          jumpLink: "",
                          jumpId: "",
                          hotAreaList: [{ type: 1, link: "", jumpId: "" }],
                        },
                      ],
                    },
                  ],
                  styleJson: {
                    templateType: 1,
                    paddingTB: 12,
                    backgroundColor: "#fff",
                  },
                },
                {
                  id: 32,
                  type: "package-goods",
                  name: "商品组件",
                  mainJson: [
                    {
                      peopleRule: 1,
                      contentJson: {
                        key: 123,
                        data: [
                          {
                            id: "",
                            rank: 1,
                            skuId: "A001S01R001",
                            name: "黄凯特芒",
                            // 规格、类型等
                          },
                          {
                            id: "",
                            rank: 2,
                            skuId: "C001S03R003",
                            name: "泰国无核榴莲冻肉",
                            // 规格 类型等
                          },
                        ],
                        filterItems: ["no-stock", "remove"],
                        showLimit: 10,
                      },
                    },
                  ],
                  styleJson: {
                    templateType: 1,
                    paddingTB: 12,
                    backgroundColor: "#fff",
                  },
                },
              ],
            },
            {
              id: "",
              rank: 2,
              name: "茶饮",
              children: [],
            },
          ],
        },
      },
    ],
    styleJson: {
      templateType: 1,
      // tab样式：1文字 2图片
      tabType: 1,
      tabColor: "#999",
      tabColorSelected: "#000",
      backgroundColor: "#fff",
    },
  },
];

const configJson = {
  'header-nav': []
}

const navConfig = [
  {
    type: 'a-input',
    label: '页面名称',
    value: '新版专题页',
    name: 'pageName',
    rules: [],
  },
  {
    type: 'a-range-picker',
    label: '在线时间',
    value: [],
    name: 'onlineTime',
  },
  {
    type: 'a-checkbox-group',
    label: '悬浮按钮',
    value: ['home'],
    name: 'hoverBtns',
    options: [
      {
        label: "首页",
        value: 'home',
      },
      {
        label: "购物车",
        value: 'shopping-cart',
      },
    ],
  },
  {
    type: 'a-radio-group',
    label: '页面分享',
    value: 1,
    name: 'isShare',
    options: [
      {
        label: "允许",
        value: 1,
      },
      {
        label: "不允许",
        value: 2,
      },
    ],
  },
  {
    type: 'a-input',
    label: '页面名称',
    value: '分享标题',
    name: 'shareTitle',
    rules: [],
  },
]
